/** 建筑队列行 */
cc.Class({
    extends: cc.Component,

    properties: {
        /** 建筑名 */
        txt_name:cc.Label,
        /** 建筑等级 */
        txt_lev:cc.Label,
        /** 剩余时间 */
        txt_time:cc.Label,
        /** 加速按钮 */
        bt_speed:cc.Button,
        /** 取消按钮 */
        bt_cancel:cc.Button,
        /** 建筑位置id */
        _aid:cc.Integer,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {},

    /** 设置属性 */
    setAid(aid){
        this._aid = aid;
        let bd = App.U.city[App.cid].area[aid-1], bi = App.C.build[bd.bid];
        this.txt_name.string = bi.name;
        this.txt_lev.string = bd.lev + "级";
        this.txt_time.string = ((bd.otime - App.dtm - Date.now())/1000|0) + "秒";
        this.bt_speed.node.on(cc.Node.EventType.TOUCH_END, function(ev){
            cc.log("bt_speed");
        }, this);
        this.bt_cancel.node.on(cc.Node.EventType.TOUCH_END, function(ev){
            cc.log("bt_cancel");
        }, this);
    },

    start () {

    },

    // update (dt) {},
});
